// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   CommUtil.java

package com.crm.common;

import com.crm.user.po.UserInfo;
import javax.servlet.http.HttpSession;

public class CommUtil
{

	public CommUtil()
	{
	}

	public static boolean hasRight(HttpSession session, String sModuleId)
	{
		try {
		String modulelist;
		UserInfo userinfo;
		modulelist = (String)session.getAttribute("modulelist");
		userinfo = (UserInfo)session.getAttribute("user");
		if (userinfo.getEmployee_id().equals("admin"))
			return true;
		modulelist = (new StringBuilder(",")).append(modulelist).append(",").toString();
		return modulelist.indexOf((new StringBuilder(",")).append(sModuleId).append(",").toString()) > -1;
		} catch (Exception e) {
			return false;
		}
		
	}
}
